import { eventHandler } from 'h3';

export default eventHandler((event) => {
  const { page, pageSize } = getQuery(event);

  return usePageResponseSuccess(
    page as string,
    pageSize as string,
    [
      {
        id: 69,
        createdAt: 1_753_953_007_788,
        updatedAt: 1_753_953_007_788,
        status: 1,
        sort: 1,
        name: '物流部门',
        ancestors: null,
        leader: '物流主管',
        phone: '18888888888',
        email: '222@qq.com',
        remark: null,
        parentId: 0,
      },
      {
        id: 68,
        createdAt: 1_747_797_686_265,
        updatedAt: 1_747_797_686_265,
        status: 0,
        sort: 1,
        name: '徐坤166666666555555555555',
        ancestors: null,
        leader: '11',
        phone: '11',
        email: '111@qq.com',
        remark: null,
        parentId: 63,
      },
      {
        id: 66,
        createdAt: 1_747_708_872_114,
        updatedAt: 1_747_708_872_114,
        status: 0,
        sort: 1,
        name: '1111111',
        ancestors: null,
        leader: '22',
        phone: '1212121',
        email: '212',
        remark: null,
        parentId: 63,
      },
      {
        id: 64,
        createdAt: 1_747_385_997_334,
        updatedAt: 1_747_385_997_334,
        status: 0,
        sort: 1,
        name: '2222',
        ancestors: null,
        leader: '222',
        phone: '222',
        email: '22@qq.com',
        remark: null,
        parentId: 0,
      },
      {
        id: 63,
        createdAt: 1_747_379_259_049,
        updatedAt: 1_747_379_259_049,
        status: 1,
        sort: 1,
        name: '篮球部',
        ancestors: null,
        leader: '飞哥',
        phone: '55757',
        email: '5656@qq.com',
        remark: null,
        parentId: 0,
      },
      {
        id: 1,
        createdAt: 1_745_519_180_135,
        updatedAt: 1_745_519_180_135,
        status: 1,
        sort: 1,
        name: '足球部',
        ancestors: '',
        leader: 'admin',
        phone: '18888888888',
        email: 'simpleadmin@gmail.com',
        remark: 'Super Administrator',
        parentId: 0,
      },
      {
        id: 65,
        createdAt: 1_747_386_030_838,
        updatedAt: 1_747_386_030_838,
        status: 1,
        sort: 4,
        name: '111',
        ancestors: null,
        leader: '11',
        phone: '11',
        email: '11@qq.com',
        remark: '1',
        parentId: 0,
      },
    ],
    {
      message: 'ok',
    },
  );
});
